'''
Created on 2011-07-10

@author: Mikael
'''

from PyQt4.QtGui import *
from View.Helpers.FileDialogHelper import FileSystemExplorer
from Model.EditorPath import EditorPath
import PyQt4
from Model.Session import Session, getSessionInstance
from Model.Project import Project
from Model.Scene import Scene


class MainMenuController(object):
    '''
    classdocs
    '''


    def __init__(self):
        '''
        Constructor
        '''
        self.mSession = Session()
        self.mSession = getSessionInstance()
        self.setScene(self.mSession.getScene())
        self.setProject(self.mSession.getProject())
        
    def setScene(self, Scene):
        self.mScene = Scene
    
    def setProject(self, Project):
        self.mProject = Project
    
    #################################    
    # File menu
    #################################
    
    def newProject(self, projectName, filePath):
        '''
        ''' 
        self.mProject = self.mSession.getProject()
        self.mProject.Initialize(filePath, projectName)
        self.mProject.saveToFile()
    
    
        
    
    def openProject(self, filePath):
        '''
        '''
        self.mProject = self.mSession.getProject()
        self.mProject.reloadFromFile(filePath)
    
    def saveProject(self):
        '''
        '''
        
    
    def newScene(self):
        '''
        '''
        
    
    def importResource(self):
        '''
        '''
        
    
    def quit(self):
        '''
        '''
    
    #################################    
    # Edit menu
    #################################
    
    def undo(self):
        '''
        '''
        
        
    def redo(self):
        '''
        '''
        
        
    def cut(self):
        '''
        '''
        
        
    def paste(self):
        '''
        '''
        
    
    def delete(self):
        '''
        '''
        
        
    def preference(self):
        '''
        '''
    
    #################################    
    # Project menu
    #################################
            
    def createProjectFolder(self, folderName):
        '''
        '''
        self.mProject.addFolder(folderName)
        
    def createScene(self, sceneName):
        self.mProject.addScene(sceneName)
    
    #################################    
    # Scene menu
    #################################
    
    def createEntity(self):
        '''
        '''
        
    def createSceneFolder(self, folderName):
        '''
        '''
        self.mScene.addFolder(folderName)
    
    def entityProperty(self):
        '''
        '''
        
        
    #################################    
    # View menu
    #################################
    
    def showProjectExplorer(self):
        '''
        '''
        
        
        
        
    def showSceneExplorer(self):
        '''
        '''
